﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Web.Profile;

namespace WebSite
{
    public partial class div : System.Web.UI.Page
    {
        // Fields
        public string istrue = "0";
        public string msg = "";

        // Methods
        private void Binds()
        {
            string sql = "select top 1 * from DB_Shopconfig where shopid=1 ";
            DataTable table = new DataTable();
            table = SQLAccess.GreatDs(sql).Tables[0];
            if (table.Rows.Count > 0)
            {
                if (table.Rows[0]["shopisflower"].ToString() == "1")
                {
                    this.istrue = "1";
                    this.msg = this.msg + "";
                    if (table.Rows[0]["shopqq"].ToString() != "")
                    {
                        string[] strArray = table.Rows[0]["shopqq"].ToString().Split(new char[] { '|' });
                        for (int i = 0; i <= (strArray.Length - 1); i++)
                        {
                            string msg = this.msg;
                            this.msg = msg + "<tr style=CURSOR: hand align=center><td style=PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px valign=middle height=25><A class=b href=http://wpa.qq.com/msgrd?V=1&amp;Uin=" + strArray[i] + "&amp;Menu=no target=blank><img border=0 SRC=http://wpa.qq.com/pa?p=1:" + strArray[i] + ":7 alt=点击这里给我发消息></A></TD></TR>";
                        }
                    }
                    if (table.Rows[0]["shopmsn"].ToString() != "")
                    {
                        string[] strArray2 = table.Rows[0]["shopmsn"].ToString().Split(new char[] { '|' });
                        for (int j = 0; j <= (strArray2.Length - 1); j++)
                        {
                            this.msg = this.msg + "<tr style=CURSOR: hand align=center><td style=PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px valign=middle height=25><A class=b href=msnim:chat?contact=" + strArray2[j] + " target=_blank><IMG src=/images/msnunknown.gif width=18  border=0> MSN交谈</A></TD></TR>";
                        }
                    }
                    if (table.Rows[0]["shopaliwan"].ToString() != "")
                    {
                        string[] strArray3 = table.Rows[0]["shopaliwan"].ToString().Split(new char[] { '|' });
                        for (int k = 0; k <= (strArray3.Length - 1); k++)
                        {
                            string str3 = this.msg;
                            this.msg = str3 + "<tr style=CURSOR: hand align=center><td style=PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px valign=middle height=25><a target=_blank href=http://amos.im.alisoft.com/msg.aw?v=2&uid=" + strArray3[k] + "&site=cntaobao&s=1&charset=utf-8 ><img border=0 src=http://amos.im.alisoft.com/online.aw?v=2&uid=" + strArray3[k] + "&site=cntaobao&s=1&charset=utf-8 alt=点击这里给我发消息 /></a></TD></TR>";
                        }
                    }
                    if (table.Rows[0]["shopyahoo"].ToString() != "")
                    {
                        string[] strArray4 = table.Rows[0]["shopyahoo"].ToString().Split(new char[] { '|' });
                        for (int m = 0; m <= (strArray4.Length - 1); m++)
                        {
                            string str4 = this.msg;
                            this.msg = str4 + "<tr style=CURSOR: hand align=center><td style=PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px valign=middle height=25><a target=_blank href=http://web.im.alisoft.com/msg.aw?v=2&uid=" + strArray4[m] + "&site=cnalichn&s=4 ><img border=0 src=http://web.im.alisoft.com/online.aw?v=2&uid=" + strArray4[m] + "&site=cnalichn&s=4  alt=点击这里给我发消息 /></a></TD></TR>";
                        }
                    }
                    if (table.Rows[0]["shopskype"].ToString() != "")
                    {
                        this.msg = this.msg + "<script type=text/javascript src=http://download.skype.com/share/skypebuttons/js/skypeCheck.js></script>";
                        string[] strArray5 = table.Rows[0]["shopskype"].ToString().Split(new char[] { '|' });
                        for (int n = 0; n <= (strArray5.Length - 1); n++)
                        {
                            string str5 = this.msg;
                            this.msg = str5 + "<tr style=CURSOR: hand align=center><td style=PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px valign=middle height=25><a href=skype:" + strArray5[n] + "><img src=http://mystatus.skype.com/balloon/" + strArray5[n] + " style=border: none; width=90 alt=My status /></a></TD></TR>";
                        }
                    }
                    this.msg = this.msg + "";
                }
                else if (table.Rows[0]["shopisflower"].ToString() == "2")
                {
                    this.msg = this.msg + table.Rows[0]["shopmessage"].ToString();
                }
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                this.Binds();
            }
        }

        // Properties
        protected global_asax ApplicationInstance
        {
            get
            {
                return (global_asax)this.Context.ApplicationInstance;
            }
        }

        protected DefaultProfile Profile
        {
            get
            {
                return (DefaultProfile)this.Context.Profile;
            }
        }

    }
}